1. Field of the Invention
The present invention relates to a numerical controller, and more particularly, to a numerical controller equipped with a drawing path correction function for drawing a machining path by correcting machining path deviations occurring during machining.
2. Description of the Related Art
Generally, a numerical controller is equipped with a check drawing function for checking an NC program before machining and a machining drawing function for displaying a machining trajectory by plotting locations during machining. Furthermore, a check drawing path produced before machining and a trajectory produced by machining drawing are displayed in superposed manner, thereby making it possible to check the progress of machining (see, for example, Japanese Patent Application Laid-Open No. 05-033126).
An example of a conventional technique is shown in FIG. 9, in which, for example, an unmachined path and machined path during wire electrical discharge machining are displayed in superposed manner, thereby making it possible to check the progress of machining. As shown in FIG. 9, the unmachined path is displayed before machining so that a machining program may be checked. Such a drawing display is referred to as check drawing. Regarding the machined path, a trajectory is drawn by displaying the current positions, moment by moment, as a point sequence during machining. Such a drawing display is referred to as machining drawing.
However, there is a problem in that if it becomes necessary to carry out machining at a position shifted from a position commanded by a machining program due to pre-machining treatment of a workpiece, a mounting error of a machine tool, or a programming error in a machining start position, the path of check drawing and trajectory of machining drawing do not overlap each other, making it impossible to judge the progress of machining accurately.
This problem will be described by taking as an example a multi-piece machining program for the wire electrical discharge machining of FIG. 10. FIG. 11 is a check drawing according to the machining program of FIG. 10.
For example, in the case of multi-piece machining shown in FIGS. 10 and 11, before a workpiece is mounted on a wire electrical discharge machine, start holes for wire connection are provided at start positions of respective machining runs in advance. However, due to workpiece displacement caused when a workpiece is mounted on the wire electrical discharge machine, errors in a machining program, or errors in the position or hole diameter of machining start holes provided in advance, start positions commanded by the program and start hole positions of respective machining runs may sometimes deviate from each other as shown in FIG. 12.
In such a case, it is necessary to measure the hole positions of the machining start holes and correct the machining program accordingly, but the correction operation takes a great deal of time and effort, and consequently it is often the case that machining is carried out directly without correcting the machining program.
Referring to the example of FIG. 12, if machining is carried out in such a situation, since a second machining start hole does not match the start position when positioning at the second machining start hole is performed, connection of the wire fails, causing automatic operation to pause and output a warning indicating failure of connection. An operator manually moves an axis to near the center of the start hole and restarts the automatic operation with a wire connection command in an interrupted block. Then, the wire is connected and the second machining run is performed.
However, as shown in FIG. 13, with this type of machining, the trajectory of machining drawing deviates from the path of check drawing by an amount corresponding to the amount moved by manual operation. When drawing is done with such a deviation, there is a problem in that a relationship between an unmachined path and machined path becomes difficult to see in the case of a complicated machining geometry, making it difficult to judge the progress of machining from the drawing alone and thereby making it necessary for an operator to judge approximate progress of machining based on a relationship between estimated machining time and actual machining time or between estimated machining distance and actual machining distance.